Introduction to R

Open source language and environment for analysis, statistics & visualization

Tutorial goals

  • Why is it worthwhile to learn R?
  • Getting ready to work with R in the R Studio work environment.
  • Learn very basic concepts of R.
  • Being able to conduct exercises on your own, “play” with R.
  • Learn about R resources.
  • Together with our tutorials on GitHub, building EML with R and Pasta Rest API prepare you for catalogging your data in EDI.

Why is it worthwhile to learn R?

  • User friendly data analysis and statistics.
  • Excellent tools for visualization.
  • Used in research and data science community.
  • Free, open source scripting language.
  • CRAN: Comprehensive R Archive Network.
  • Compiles and runs on a wide variety of UNIX platforms, Windows and MacOS.
  • Extended support network and tools.

Examples of R visualization


Use data set “mpg” (provided with R): Fuel economy data from 1999 and 2008 for 38 popular models of car

# list the structure of mpg
str(mpg)
Classes 'tbl_df', 'tbl' and 'data.frame':   234 obs. of  11 variables:
 $ manufacturer: chr  "audi" "audi" "audi" "audi" ...
 $ model       : chr  "a4" "a4" "a4" "a4" ...
 $ displ       : num  1.8 1.8 2 2 2.8 2.8 3.1 1.8 1.8 2 ...
 $ year        : int  1999 1999 2008 2008 1999 1999 2008 1999 1999 2008 ...
 $ cyl         : int  4 4 4 4 6 6 6 4 4 4 ...
 $ trans       : chr  "auto(l5)" "manual(m5)" "manual(m6)" "auto(av)" ...
 $ drv         : chr  "f" "f" "f" "f" ...
 $ cty         : int  18 21 20 21 16 18 18 18 16 20 ...
 $ hwy         : int  29 29 31 30 26 26 27 26 25 28 ...
 $ fl          : chr  "p" "p" "p" "p" ...
 $ class       : chr  "compact" "compact" "compact" "compact" ...
# print mpg
mpg
# A tibble: 234 x 11
   manufacturer      model displ  year   cyl      trans   drv   cty   hwy
          <chr>      <chr> <dbl> <int> <int>      <chr> <chr> <int> <int>
 1         audi         a4   1.8  1999     4   auto(l5)     f    18    29
 2         audi         a4   1.8  1999     4 manual(m5)     f    21    29
 3         audi         a4   2.0  2008     4 manual(m6)     f    20    31
 4         audi         a4   2.0  2008     4   auto(av)     f    21    30
 5         audi         a4   2.8  1999     6   auto(l5)     f    16    26
 6         audi         a4   2.8  1999     6 manual(m5)     f    18    26
 7         audi         a4   3.1  2008     6   auto(av)     f    18    27
 8         audi a4 quattro   1.8  1999     4 manual(m5)     4    18    26
 9         audi a4 quattro   1.8  1999     4   auto(l5)     4    16    25
10         audi a4 quattro   2.0  2008     4 manual(m6)     4    20    28
# ... with 224 more rows, and 2 more variables: fl <chr>, class <chr>
# help on mpg
?mpg
  • manufacturer
  • model: model name
  • displ: engine displacement, in litres
  • drv: f = front-wheel drive, r = rear wheel drive, 4 = 4wd
  • cty: city miles per gallon
  • hwy: highway miles per gallon
  • class: “type” of car

Examples of R visualization

R functions

A function is a set of statements organized together to perform a specific task. Arguments control how the function is used.

# help on plotting function ggplot
?ggplot

Create a new ggplot

ggplot() initializes a ggplot object. It can be used to declare the input data frame for a graphic and to specify the set of plot aesthetics intended to be common throughout all subsequent layers unless specifically overridden.

Usage

ggplot(data = NULL, mapping = aes(), …, environment = parent.frame())

ggplot(data = mpg) + geom_point(mapping = aes(x=displ,y=hwy),size=8) +
theme_bw(base_size = 40)

plot of chunk unnamed-chunk-5

ggplot(data = mpg) + geom_point(mapping = aes(x=displ,y=hwy),size=8) + geom_smooth(mapping = aes(x=displ,y=hwy)) +
theme_bw(base_size = 40)

plot of chunk unnamed-chunk-6

ggplot(data = mpg) + geom_point(mapping = aes(x = displ, y = hwy, color = class), size = 6) + 
theme_bw(base_size = 40)

plot of chunk unnamed-chunk-7

ggplot(data = mpg) + geom_point(mapping = aes(x=displ,y=hwy), size = 6) + facet_wrap(~class, nrow = 2) + theme_bw(base_size = 40)

plot of chunk unnamed-chunk-8

ggplot(data = mpg) + geom_point(mapping = aes(x=displ,y=hwy, color = manufacturer=="subaru"), size = 6) +
facet_wrap(~class, nrow = 2) +
labs(title = "Modify plot labels, title, legend", x = "engine displacement [l]", y = "highway [mpg]") +
theme_bw(base_size = 40) +
scale_colour_manual(values=c("#000000", "#FF0000"),name="Subaru") + theme(legend.justification=c(1,0), legend.position=c(1,0))

plot of chunk unnamed-chunk-9

Grossman-Clarke S. et al. 2017. International Journal of Climatology 37(2): 905–917, doi: 10.1002/joc.4748.

Grossman-Clarke S. et al. 2017. International Journal of Climatology 37(2): 905–917, doi: 10.1002/joc.4748.

Grossman-Clarke S. et al. 2017. International Journal of Climatology 37(2): 905–917, doi: 10.1002/joc.4748.

Setting up to work with R in the R Studio environment

RStudio is an integrated development environment (IDE) for R.

Three steps for installing RStudio

  1. Install R
  2. Install R-Studio
  3. Install R-Packages

Install R from CRAN: http://cran.r-project.org/


Download the binary setup file for R for your operating system

Open the downloaded file .exe (windows) or .pkg (macosx) and install following instructions

Install R Studio from www.rstudio.com


Download the free Desktop R Studio version here: http://www.rstudio.com/products/rstudio/download/

  • Choose from Installers for Supported Platforms
  • Open file and Install

READY! OPEN R Studio by clicking on the prompt!

R Studio Environment

R Studio Environment - Preferences

Installing R-Packages in R Studio


What is an R-package?

Packages are collections of R functions, example data, and compiled code.

  • standard set of packages with R
  • other packages available for download and installation

Installing R-Packages in R Studio


  1. Choose mirror: RStudio -> Preferences -> Packages

  2. Menu -> Tools -> Install packages

Updating R-Packages in R Studio


From main R menu choose:

Tools -> Check for package updates

Using R-Packages in R Studio


In order to use a package it needs to be loaded in each new R session via console or included in a script:

# load package (use pound key for comments)
library(ggplot2)

R Stats Package


# print information on installed packages
sessionInfo()
R version 3.3.2 (2016-10-31)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: macOS Sierra 10.12.5

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] dplyr_0.7.0     purrr_0.2.2.2   readr_1.1.1     tidyr_0.6.3    
[5] tibble_1.3.3    ggplot2_2.2.1   tidyverse_1.1.1 knitr_1.16     

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.11     highr_0.6        cellranger_1.1.0 plyr_1.8.4      
 [5] forcats_0.2.0    tools_3.3.2      digest_0.6.12    jsonlite_1.5    
 [9] lubridate_1.6.0  evaluate_0.10    gtable_0.2.0     nlme_3.1-131    
[13] lattice_0.20-35  rlang_0.1.1      psych_1.7.5      parallel_3.3.2  
[17] haven_1.0.0      xml2_1.1.1       stringr_1.2.0    httr_1.2.1      
[21] hms_0.3          grid_3.3.2       glue_1.0.0       R6_2.2.1        
[25] readxl_1.0.0     foreign_0.8-68   reshape2_1.4.2   modelr_0.1.0    
[29] magrittr_1.5     scales_0.4.1     assertthat_0.2.0 mnormt_1.5-5    
[33] rvest_0.3.2      colorspace_1.3-2 labeling_0.3     stringi_1.1.5   
[37] lazyeval_0.2.0   munsell_0.4.3    broom_0.4.2     

R Stats Package


For a complete list of functions, use:

# print help on package "stat"
library(help = "stats")

Basic elements of R

  • Packages
  • Functions
  • Data structures
    • Vectors
    • Matrices
    • Character Strings
    • Lists
    • Data Frames
    • Classes
  • Variable types (also called modes): numeric, character, logical, integer …

Import data example


Micrometeorological site data in *.csv format from the Central-Arizona Phoenix LTER as available from the EDI repository

tutorial_dat<-read.csv('data1_r_intro.csv')

Read data

# print structure of data set "tutorial_dat"
str(tutorial_dat)
'data.frame':   3290 obs. of  41 variables:
 $ TIMESTAMP          : Factor w/ 3290 levels "2015-07-09 13:00:00",..: 1 2 3 4 5 6 7 8 9 10 ...
 $ RECORD             : int  0 1 2 3 4 5 6 7 8 9 ...
 $ VW_Avg             : num  0.412 0.411 0.411 0.413 0.414 0.415 0.415 0.415 0.414 0.413 ...
 $ VW_2_Avg           : num  0.42 0.421 0.421 0.422 0.422 0.422 0.423 0.423 0.424 0.424 ...
 $ VW_3_Avg           : num  0.298 0.298 0.298 0.298 0.298 0.298 0.298 0.298 0.298 0.298 ...
 $ AirTC_Avg          : num  -28 35.9 37.2 37.8 38 ...
 $ RH_Avg             : num  13 30.8 27.7 26 25 ...
 $ AirTC_2_Avg        : num  -11.1 35.6 36.8 37.4 37.7 ...
 $ RH_2_Avg           : num  16.2 29.3 26.5 24.9 24.2 ...
 $ AirTC_3_Avg        : num  -21.9 35.5 36.3 36.9 37.1 ...
 $ RH_3_Avg           : num  13.7 27.8 25.6 24.2 23.4 ...
 $ PPFin_Avg          : num  2218 1611 1969 1601 1773 ...
 $ ndvi_Jenkins_Avg   : num  0.516 0.501 0.505 0.515 0.525 0.534 0.541 0.551 0.553 0.551 ...
 $ ndvi_Huemmrich_Avg : num  0.539 0.531 0.533 0.547 0.551 0.559 0.564 0.575 0.579 0.579 ...
 $ ndvi_Wilson_Avg    : num  0.492 0.477 0.481 0.492 0.501 0.51 0.518 0.527 0.529 0.527 ...
 $ evi2_Avg           : num  0.325 0.318 0.333 0.335 0.343 0.352 0.36 0.373 0.378 0.373 ...
 $ Rain_mm_Tot        : num  0 0 0 0 0 0 0 0 0 0 ...
 $ Temp_C_Avg         : num  30.4 30.7 30.5 30.9 31.3 ...
 $ PTemp_C_Avg        : num  38.8 38.9 39 40.7 41.8 ...
 $ shf_Avg            : num  4.42 7.79 8.95 10.89 11.63 ...
 $ BP_mbar_Avg        : int  951 962 962 962 961 961 960 960 960 960 ...
 $ Batt_Volt_Min      : num  12.8 12.8 12.8 12.9 12.9 ...
 $ short_up_Avg       : num  985 725 893 732 826 ...
 $ short_dn_Avg       : num  187 136 174 134 151 ...
 $ long_up_Avg        : num  -96.8 -87.8 -106.8 -99.1 -100.4 ...
 $ long_dn_Avg        : num  27.86 4.62 22.46 21.89 25.06 ...
 $ cnr4_T_C_Avg       : num  38.2 36.9 38.1 38.6 38.5 ...
 $ long_up_corr_Avg   : num  436 436 426 436 435 ...
 $ long_dn_corr_Avg   : num  561 528 555 557 560 ...
 $ Rs_net_Avg         : num  798 589 719 598 675 ...
 $ Rl_net_Avg         : num  -124.7 -92.5 -129.3 -121 -125.4 ...
 $ albedo_Avg         : num  0.187 0.175 0.192 0.177 0.18 ...
 $ Rn_Avg             : num  673 496 590 477 550 ...
 $ TT_C               : num  36 37.3 38.2 37.4 37.2 ...
 $ SBT_C              : num  37.2 35.8 37.3 37.5 38.3 ...
 $ wnd_dir_compass_Avg: num  0 1.32 237.32 237.27 228.37 ...
 $ Rainfall           : num  0 0 0 0 0 0 0 0 0 0 ...
 $ H                  : num  NA NA 186 249 203 ...
 $ LE                 : num  NA NA 171 137 154 ...
 $ C                  : num  NA NA 0.0571 0.0822 0.0252 ...
 $ G_calc             : num  4.42 7.7 8.95 11.05 11.72 ...

Read data

# print variable AirTC_Avg of data set "tutorial_dat"
tutorial_dat$AirTC_Avg
   [1] -28.010  35.890  37.160  37.770  38.040  38.500  38.290  38.060
   [9]  37.700  37.210  36.640  35.910  35.380  34.600  33.750  33.030
  [17]  32.250  31.530  29.910  28.280  27.400  28.570  27.970  24.900
  [25]  21.750  23.120  23.150  23.040  22.930  23.060  22.090  20.050
  [33]  21.370  20.720  21.690  23.420  25.450  25.390  26.600  29.920
  [41]  32.550  33.850  34.620  35.390  36.200  36.400  36.600  37.130
  [49]  37.940  37.100  38.480  38.940  38.180  38.420  38.930  38.920
  [57]  38.180  38.200  37.200  36.500  35.720  35.190  34.560  33.890
  [65]  33.190  32.600  31.910  31.340  30.590  30.380  29.590  28.020
  [73]  26.930  26.830  26.490  26.750  26.930  26.970  26.820  25.780
  [81]  25.220  25.070  25.960  27.610  28.960  30.130  31.670  32.580
  [89]  34.110  35.300  35.830  36.510  37.140  37.460  38.300  38.760
  [97]  38.940  38.960  39.770  39.500  40.150  40.030  40.070  40.120
 [105]  40.080  40.020  38.960  38.410  37.630  36.560  35.350  34.780
 [113]  34.360  33.400  32.350  32.110  31.610  29.150  27.500  25.070
 [121]  21.840  21.920  22.510  23.870  23.770  23.990  22.600  20.550
 [129]  20.210  20.560  21.250  21.430  24.040  25.760  26.230  29.450
 [137]  31.670  32.810  33.850  35.800  37.160  37.610  38.710  38.010
 [145]  38.180  38.950  38.970  38.720  39.940  40.730  41.080  41.070
 [153]  41.400  40.870  39.670  38.400  37.730  36.830  35.220  32.280
 [161]  30.850  31.480  33.350  32.790  31.770  31.540  31.080  30.830
 [169]  30.830  30.380  30.650  30.010  29.230  28.550  27.960  27.320
 [177]  26.720  26.630  27.340  28.150  29.840  30.810  32.190  33.730
 [185]  34.770  36.730  38.250  38.840  39.220  40.040  39.960  40.670
 [193]  40.890  40.820  41.710  41.720  42.170  42.130  42.340  42.260
 [201]  41.950  41.730  40.690  40.580  40.070  39.240  38.300  37.140
 [209]  36.220  34.530  33.440  32.300  30.930  31.070  31.150  28.610
 [217]  29.310  31.020  30.840  30.740  30.400  29.900  27.060  25.860
 [225]  26.280  26.860  27.280  27.940  28.510  27.560  27.080  31.150
 [233]  33.320  35.240  36.950  37.570  38.810  39.320  39.540  39.660
 [241]  40.010  40.770  41.050  41.840  41.660  41.420  41.550  41.790
 [249]  40.840  40.130  39.350  38.970  37.930  35.890  34.780  32.650
 [257]  31.990  31.320  32.770  32.670  32.350  31.870  31.210  30.780
 [265]  30.790  30.310  30.140  30.040  29.930  29.730  29.190  29.030
 [273]  28.740  28.550  28.070  27.840  28.720  30.350  32.380  32.450
 [281]  32.870  33.970  35.740  36.580  37.820  38.290  38.560  39.280
 [289]  39.700  40.000  39.800  40.510  40.560  40.730  40.960  40.900
 [297]  40.530  40.230  39.610  38.910  38.300  37.460  35.380  33.670
 [305]  34.250  34.190  33.080  32.750  33.730  33.330  33.310  31.880
 [313]  30.440  30.620  30.270  29.640  29.740  29.960  29.310  28.340
 [321]  27.970  28.060  27.480  27.820  29.310  30.640  32.390  33.740
 [329]  35.020  36.400  36.930  38.210  38.670  39.790  39.680  40.330
 [337]  40.310  40.750  41.020  41.230  41.830  41.610  42.590  42.650
 [345]  42.310  41.810  40.940  40.050  39.270  38.100  36.120  33.510
 [353]  32.030  31.260  32.470  32.800  32.660  32.200  31.010  28.000
 [361]  27.210  28.190  28.410  28.060  27.530  27.110  25.740  23.140
 [369]  23.580  23.580  23.740  25.050  27.040  28.050  29.040  29.960
 [377]  29.990  30.810  31.700  32.380  34.810  36.240  34.900  36.430
 [385]  35.550  36.110  38.410  37.770  38.280  37.590  37.140  36.290
 [393]  36.340  35.410  34.810  34.610  34.320  33.750  32.680  32.960
 [401]  32.930  32.730  31.960  31.090  29.910  29.470  28.530  27.710
 [409]  27.240  26.560  26.610  26.570  26.270  26.060  25.870  25.300
 [417]  24.880  24.940  24.840  25.540  26.420  27.270  28.950  30.700
 [425]  31.390  32.090  33.320  34.380  34.930  35.550  37.330  37.920
 [433]  38.080  37.700  38.210  39.180  38.920  36.900  35.330  32.850
 [441]  31.980  31.350  31.260  30.980  30.680  30.760  28.970  28.890
 [449]  28.080  26.750  25.550  24.670  24.780  25.040  24.730  24.350
 [457]  23.740  23.580  23.460  23.320  23.330  23.590  23.830  23.370
 [465]  23.330  23.600  23.320  23.350  23.910  24.600  25.540  27.130
 [473]  28.670  30.630  31.300  32.960  33.330  32.770  34.320  34.700
 [481]  36.000  34.930  35.310  34.730  35.200  36.380  37.290  37.410
 [489]  36.860  35.670  34.060  33.910  33.910  33.390  32.490  31.880
 [497]  31.420  30.590  29.850  29.700  30.080  28.680  27.160  27.360
 [505]  27.290  26.230  25.790  25.550  24.820  24.280  24.050  24.320
 [513]  24.660  24.520  24.390  25.960  28.720  29.990  31.790  32.240
 [521]  33.340  34.080  33.630  34.100  35.210  36.100  36.290  37.340
 [529]  38.230  37.890  38.230  38.310  38.590  38.700  39.070  39.150
 [537]  38.770  38.340  37.750  37.120  36.300  35.520  34.520  33.220
 [545]  -0.965 -78.050 -78.130 -78.150 -78.150 -78.170 -78.170 -78.190
 [553] -78.200 -78.210 -78.200 -78.200 -78.200 -78.220 -78.210 -78.240
 [561] -78.230 -78.250 -78.200 -78.220 -78.170 -78.150 -78.130 -78.090
 [569] -78.020 -77.980 -77.930 -77.860 -77.900 -77.910 -77.850 -77.680
 [577] -77.700 -77.710 -77.720 -77.790 -77.810 -77.820 -77.760 -77.780
 [585] -77.770 -77.720 -77.800 -77.850 -77.880 -77.910 -77.960 -78.000
 [593] -13.130  31.690  30.700  30.100  29.480  29.440  28.920  30.430
 [601]  30.640  28.680  29.010  27.950  26.290  25.470  25.400  25.210
 [609]  25.480  24.450  23.110  22.960  25.190  28.250  30.940  32.800
 [617]  32.750  34.820  35.530  36.370  37.360  37.520  38.350  38.410
 [625]  39.110  39.500  39.590  40.120  40.250  40.030  40.570  40.280
 [633]  40.030  39.760  39.550  38.830  38.200  37.210  35.280  33.310
 [641]  32.280  31.370  31.710  32.900  31.630  29.850  28.130  27.640
 [649]  27.430  28.170  29.690  28.790  28.370  27.110  25.240  24.580
 [657]  23.670  23.320  23.360  24.260  25.290  26.710  29.360  31.760
 [665]  33.030  34.700  34.850  35.660  35.950  37.630  37.900  38.460
 [673]  37.820  38.950  39.350  39.510  39.450  39.510  38.870  39.810
 [681]  39.870  39.350  38.520  37.680  37.250  36.680  35.790  35.500
 [689]  32.760  32.160  32.100  31.370  30.660  30.310  29.970  28.080
 [697]  26.910  27.740  28.000  28.470  28.610  28.610  27.290  25.860
 [705]  27.030  27.300  27.460  27.500  27.980  27.420  26.880  28.680
 [713]  29.970  31.040  32.580  33.880  34.650  34.980  35.040  36.720
 [721]  37.240  38.460  39.110  38.970  39.810  40.270  40.060  40.310
 [729]  40.090  39.910  38.970  38.280  37.840  36.610  35.440  33.880
 [737]  31.290  29.900  29.560  29.520  29.170  28.100  27.060  26.680
 [745]  25.900  25.820  25.510  25.150  25.420  26.120  26.660  26.790
 [753]  26.630  26.750  26.990  27.560  28.810  28.970  30.090  31.490
 [761]  33.780  34.050  35.470  36.190  37.940  36.910  38.440  39.390
 [769]  40.350  41.300  41.670  42.410  41.500  40.710  41.730  41.710
 [777]  40.530  40.720  40.870  40.130  38.890  37.010  33.750  31.110
 [785]  30.760  30.360  29.440  29.990  30.750  29.150  28.070  25.160
 [793]  20.990  21.050  22.290  22.920  22.710  22.940  21.630  19.630
 [801]  20.880  21.640  22.190  23.130  25.430  25.580  27.020  30.470
 [809]  33.970  36.450  37.910  39.040  39.810  40.290  40.390  41.170
 [817]  42.000  41.520  42.460  41.630  42.380  42.100  42.400  41.040
 [825]  40.720  39.950  39.470  39.070  38.510  38.180  37.140  35.770
 [833]  35.280  34.250  32.590  29.810  28.270  27.990  28.700  28.290
 [841]  28.360  27.940  27.050  27.110  26.540  25.840  25.610  25.170
 [849]  24.500  24.510  24.230  24.920  26.680  28.990  30.960  32.820
 [857]  34.690  36.620  37.810  37.810  37.880  38.270  38.790  39.820
 [865]  40.370  40.430  40.590  40.880  40.830  41.480  41.490  41.120
 [873]  41.550  41.100  40.670  39.710  38.640  37.200  35.140  33.450
 [881]  32.160  31.750  30.230  29.490  29.440  30.400  29.820  28.770
 [889]  28.520  27.450  27.700  28.230  29.690  28.680  26.650  23.900
 [897]  23.650  24.100  24.730  25.100  25.700  26.380  25.820  28.750
 [905]  31.740  33.780  35.460  35.530  36.790  37.870  38.880  40.600
 [913]  41.140  40.260  41.080  40.330  41.540  41.660  39.630  39.090
 [921]  38.870  38.740  38.370  38.060  37.260  36.850  35.950  34.690
 [929]  33.720  32.740  31.820  31.140  30.240  29.840  29.580  28.950
 [937]  28.700  28.630  29.180  28.910  28.410  27.720  27.390  27.220
 [945]  27.290  26.900  27.290  27.740  29.020  29.690  30.020  30.280
 [953]  30.830  31.710  32.320  33.630  33.590  33.970  35.180  34.790
 [961]  35.980  36.880  36.920  37.460  37.800  39.040  38.230  38.880
 [969]  38.520  38.460  37.690  36.870  36.840  34.230  31.600  30.520
 [977]  30.580  30.220  29.770  29.800  29.500  29.260  28.400  27.820
 [985]  27.630  27.510  27.210  27.060  26.780  27.140  27.490  27.010
 [993]  26.750  26.190  25.680  25.750  26.350  27.740  30.410  32.700
[1001]  33.830  35.940  37.170  37.410  38.140  39.480  39.700  39.760
[1009]  40.080  40.310  40.230  40.980  40.400  40.450  40.490  40.130
[1017]  40.230  40.050  39.710  38.930  37.930  36.610  34.900  32.280
[1025]  30.960  30.690  30.490  30.370  30.430  30.220  29.900  27.990
[1033]  25.880  25.560  25.810  26.720  27.600  27.730  26.010  24.050
[1041]  24.490  24.440  24.470  25.660  28.060  29.920  28.740  30.600
[1049]  33.470  36.460  37.960  37.920  39.660  39.900  40.140  41.250
[1057]  41.280  40.590  40.920  42.680  39.820  37.880  35.760  34.340
[1065]  34.020  32.920  28.180  28.010  28.450  27.490  25.710  25.810
[1073]  26.180  25.810  26.180  26.840  26.790  27.110  26.950  26.930
[1081]  26.780  26.630  26.870  26.590  26.450  26.380  26.300  26.500
[1089]  26.600  26.750  26.620  26.040  28.380  29.680  30.590  31.380
[1097]  32.490  33.820  34.730  36.130  37.350  38.150  39.090  38.480
[1105]  38.500  38.790  38.880  39.410  39.360  39.400  39.490  39.060
[1113]  39.130  39.120  38.620  37.990  37.210  36.250  34.490  33.020
[1121]  31.650  31.180  30.590  30.220  29.950  30.050  30.510  27.730
[1129]  26.750  28.500  28.790  28.650  28.890  28.470  26.930  24.630
[1137]  25.550  25.180  25.410  25.270  27.070  28.190  29.040  31.510
[1145]  34.170  36.460  37.710  38.150  38.870  40.040  40.400  39.980
[1153]  40.360  40.710  41.380  41.140  41.170  41.730  41.310  41.950
[1161]  41.210  41.120  40.950  40.020  38.800  37.260  34.320  32.520
[1169]  31.550  30.830  30.540  30.430  29.810  29.230  29.370  29.040
[1177]  28.520  28.360  27.800  27.280  26.180  26.300  26.280  26.580
[1185]  26.900  27.180  26.920  27.160  28.210  30.150  32.290  34.230
[1193]  35.420  36.820  38.610  39.970  40.820  40.910  41.190  42.710
[1201]  41.810  41.860  42.080  42.730  42.580  43.390  42.810  42.260
[1209]  42.310  42.480  42.380  41.050  39.810  37.960  36.250  33.710
[1217]  31.660  30.610  29.790  29.100  28.530  27.910  27.970  26.950
[1225]  22.620  22.680  23.830  25.860  25.480  25.690  24.750  21.810
[1233]  21.510  22.290  22.760  24.240  26.140  26.770  27.680  30.740
[1241]  34.370  37.150  38.190  38.940  40.120  40.580  42.510  42.080
[1249]  41.670  42.620  42.340  42.610  42.900  42.880  43.520  43.600
[1257]  43.410  43.090  42.780  41.600  40.070  38.770  35.950  32.830
[1265]  31.550  30.910  30.560  29.710  28.750  28.610  27.940  27.310
[1273]  26.920  26.790  26.700  26.480  26.010  25.520  25.150  24.920
[1281]  24.710  24.170  23.980  24.160  25.820  28.910  31.520  34.060
[1289]  35.760  37.830  39.030  39.150  40.130  40.770  41.310  42.440
[1297]  42.810  42.810  42.800  43.670  43.650  44.560  43.700  43.800
[1305]  43.510  43.200  42.830  41.730  40.870  39.720  37.650  34.900
[1313]  33.200  31.870  31.300  30.380  30.160  29.810  29.200  29.340
[1321]  29.500  29.460  30.290  30.280  29.960  30.710  30.540  29.280
[1329]  28.710  29.550  29.480  30.690  31.800  32.020  33.190  33.380
[1337]  33.060  33.490  35.080  35.660  37.750  38.080  38.700  38.140
[1345]  37.870  37.990  38.260  40.730  40.340  40.850  41.390  42.010
[1353]  41.480  40.910  40.020  38.500  36.290  34.030  32.490  31.360
[1361]  30.440  29.990  29.030  29.270  29.120  28.680  28.940  27.150
[1369]  23.460  23.770  24.700  25.440  26.460  26.840  25.500  23.000
[1377]  24.890  26.940  27.770  28.850  31.130  31.200  31.210  30.610
[1385]  30.540  32.260  32.710  36.240  38.090  39.760  38.880  39.340
[1393]  37.690  38.920  39.610  39.990  40.300  40.470  38.470  28.810
[1401]  27.490  27.520  29.050  29.350  29.070  27.350  25.240  25.380
[1409]  25.750  25.710  25.260  25.390  24.870  25.110  25.610  25.680
[1417]  25.700  25.670  25.430  25.410  25.350  24.970  24.710  24.740
[1425]  25.040  25.030  25.040  25.090  25.560  27.000  28.390  29.960
[1433]  31.550  33.950  35.110  35.560  36.360  37.280  37.820  37.600
[1441]  37.850  37.530  38.430  38.580  39.710  38.900  39.190  38.650
[1449]  38.500  38.570  37.200  35.850  34.660  33.510  31.620  30.830
[1457]  30.030  29.930  29.960  30.800  30.010  29.020  28.720  27.900
[1465]  25.140  25.650  25.600  25.750  26.650  27.120  26.240  24.110
[1473]  24.550  25.530  25.710  25.800  26.780  27.650  27.760  30.260
[1481]  32.810  35.030  36.540  38.330  38.790  39.180  38.790  39.610
[1489]  39.650  39.750  39.810  40.310  40.140  40.440  40.310  40.600
[1497]  40.380  40.400  39.990  39.390  38.280  36.170  33.780  32.930
[1505]  32.630  32.870  32.200  31.650  31.040  30.500  29.880  30.070
[1513]  30.110  29.940  30.770  30.200  28.990  28.250  28.320  28.410
[1521]  26.870  26.360  26.420  26.410  27.220  28.780  29.470  30.000
[1529]  31.050  34.270  34.200  34.800  37.730  38.220  38.730  38.720
[1537]  40.200  38.600  38.830  39.740  39.860  39.950  39.460  39.260
[1545]  39.200  39.010  38.630  37.840  37.200  36.460  35.580  33.690
[1553]  32.660  31.850  31.380  31.230  32.420  33.490  33.480  30.110
[1561]  26.020  26.700  28.340  28.660  28.730  29.090  27.350  24.970
[1569]  25.750  27.000  27.080  27.980  29.650  29.940  30.700  31.830
[1577]  33.530  33.530  28.920  26.520  25.090  26.180  27.730  28.720
[1585]  29.310  32.190  34.830  35.950  36.280  35.580  35.710  36.930
[1593]  38.040  37.930  36.610  36.310  34.780  33.410  32.010  31.600
[1601]  31.480  27.330  23.180  23.970  24.260  24.150  23.960  23.760
[1609]  24.450  25.280  25.460  25.330  25.370  25.380  25.110  25.280
[1617]  25.370  24.670  24.590  25.000  26.000  28.010  30.290  31.390
[1625]  33.130  34.590  36.020  36.890  38.430  39.570  39.590  40.860
[1633]  41.230  41.220  41.160  41.160  41.870  42.410  42.680  42.560
[1641]  41.850  40.500  39.280  38.990  38.320  35.790  34.690  34.190
[1649]  33.890  33.370  32.300  31.870  30.790  30.780  30.220  29.160
[1657]  28.450  28.200  28.350  27.980  27.390  26.910  26.450  26.190
[1665]  25.990  25.860  25.020  25.000  26.780  28.900  30.630  32.090
[1673]  33.770  34.950  36.480  38.240  39.260  40.930  41.400  42.800
[1681]  43.080  43.720  43.920  43.680  44.460  44.980  44.900  44.720
[1689]  44.010  43.400  42.820  42.300  40.930  38.530  35.590  34.890
[1697]  33.800  32.960  33.010  32.800  31.920  31.350  32.690  30.480
[1705]  26.960  28.430  30.040  30.690  30.860  30.690  28.390  26.120
[1713]  26.820  28.000  29.110  29.100  30.600  30.300  29.510  32.110
[1721]  34.560  36.470  38.790  40.380  41.700  42.030  42.310  43.050
[1729]  43.520  43.640  43.600  44.030  44.590  43.840  44.500  43.840
[1737]  42.230  43.050  42.420  40.980  39.180  38.920  38.090  37.300
[1745]  36.110  31.550  26.930  29.120  30.620  30.860  30.570  30.120
[1753]  29.920  29.920  29.660  29.160  28.710  28.260  28.130  27.840
[1761]  27.620  27.510  27.480  28.170  29.390  31.200  32.620  34.170
[1769]  35.800  36.890  38.420  39.540  39.920  40.840  40.470  41.500
[1777]  42.330  42.180  42.660  43.720  44.350  44.270  45.040  45.110
[1785]  44.580  44.800  44.400  43.320  41.730  39.090  36.480  35.130
[1793]  34.130  33.430  32.530  31.790  31.800  32.170  31.100  28.880
[1801]  25.040  26.180  27.920  28.750  30.540  32.720  30.750  26.480
[1809]  26.830  27.670  28.560  27.890  29.140  29.970  29.740  31.480
[1817]  33.970  35.530  37.100  38.710  39.940  40.640  41.560  41.150
[1825]  40.990  40.800  41.050  41.980  41.810  42.190  43.060  43.610
[1833]  43.110  42.390  41.960  42.190  41.460  40.240  38.470  35.840
[1841]  35.890  33.080  30.060  33.870  34.920  35.000  32.960  31.350
[1849]  31.160  31.270  30.400  29.790  29.710  30.370  31.080  29.910
[1857]  28.890  28.720  28.990  30.320  31.010  31.960  32.930  33.720
[1865]  34.290  35.140  36.310  38.280  39.560  40.030  39.900  38.820
[1873]  39.500  40.380  40.040  40.230  40.410  40.600  40.790  41.010
[1881]  40.810  40.790  40.510  40.010  39.320  38.460  37.000  37.010
[1889]  36.440  35.990  35.020  34.540  33.150  33.050  33.290  30.110
[1897]  27.250  27.010  26.580  26.860  26.750  26.400  25.160  23.120
[1905]  23.110  23.540  23.540  23.980  25.430  25.560  25.240  27.900
[1913]  30.840  32.820  34.620  36.160  37.020  37.110  37.540  37.850
[1921]  38.430  38.550  38.610  39.490  40.180  40.090  40.950  40.840
[1929]  40.970  40.240  39.710  38.650  37.700  36.750  35.610  34.560
[1937]  32.110  28.890  25.340  29.820  31.610  31.310  29.100  27.850
[1945]  27.720  27.610  26.750  26.270  25.880  25.220  24.940  24.870
[1953]  24.570  24.630  24.850  24.840  25.590  27.040  28.420  29.660
[1961]  31.310  33.090  35.090  37.300  38.340  38.110  38.250  39.140
[1969]  39.240  38.680  39.170  39.990  39.250  40.500  40.050  39.760
[1977]  39.100  39.150  39.150  38.410  36.870  34.500  32.550  31.520
[1985]  30.540  29.790  29.290  28.840  28.470  28.130  28.190  27.600
[1993]  27.040  26.520  26.710  26.130  25.980  25.960  25.560  25.080
[2001]  24.810  24.570  24.410  24.170  25.270  27.710  30.110  31.900
[2009]  33.420  34.570  36.030  37.520  37.960  39.010  39.310  39.630
[2017]  39.390  39.860  39.680  40.150  40.530  40.940  40.900  41.510
[2025]  40.850  40.680  40.090  39.200  37.980  36.740  35.810  34.820
[2033]  33.520  32.210  30.980  30.590  29.920  29.380  28.920  27.030
[2041]  23.790  25.060  25.860  25.850  25.800  25.380  24.630  22.990
[2049]  23.560  24.510  24.990  25.710  27.010  27.520  26.670  29.230
[2057]  31.500  33.760  35.120  36.110  36.540  37.480  37.770  38.490
[2065]  39.090  39.390  39.180  39.400  40.100  40.110  39.970  40.290
[2073]  39.990  39.770  39.840  38.530  37.280  35.750  34.880  33.700
[2081]  33.150  31.530  29.260  31.890  32.710  32.830  32.290  30.940
[2089]  31.490  31.850  30.340  35.860  36.910  38.010  39.010  39.620
[2097]  39.830  39.820  40.850  40.440  39.920  39.860  40.040  40.410
[2105]  40.860  39.540  39.600  39.340  39.010  37.890  35.490  33.900
[2113]  33.260  32.890  31.710  31.580  31.090  31.390  30.850  31.090
[2121]  32.770  30.270  27.910  28.660  28.770  28.260  28.140  28.260
[2129]  26.780  24.580  25.390  25.760  25.320  25.500  27.370  27.730
[2137]  26.850  28.820  30.720  33.090  33.460  34.300  37.790  36.830
[2145]  36.890  36.750  35.610  35.620  36.810  37.450  38.150  38.360
[2153]  37.170  36.120  36.060  34.050  27.310  27.330  27.120  27.370
[2161]  27.800  28.020  28.520  27.400  25.690  26.060  26.470  26.640
[2169]  27.010  27.680  27.200  26.920  26.130  25.420  25.270  25.040
[2177]  24.690  24.070  24.050  24.160  24.410  24.840  25.740  27.720
[2185]  28.970  30.140  32.170  34.540  36.160  37.010  38.200  38.760
[2193]  39.070  40.550  39.440  39.990  38.960  39.300  39.320  39.790
[2201]  39.770  40.000  39.500  38.850  38.300  37.540  36.500  35.250
[2209]  33.180  31.650  31.200  32.430  31.920  31.230  30.930  30.100
[2217]  29.730  30.520  30.160  29.370  28.590  28.130  28.690  27.810
[2225]  27.360  26.720  26.460  26.530  25.970  25.790  26.750  28.780
[2233]  30.900  32.650  34.090  36.000  37.910  39.130  39.620  40.320
[2241]  40.210  40.050  40.370  40.450  40.250  38.920  40.980  40.960
[2249]  40.400  37.370  36.870  34.310  28.630  27.510  28.560  29.400
[2257]  29.090  28.900  27.910  27.850  28.180  27.880  27.890  27.290
[2265]  26.040  24.770  22.490  22.420  22.920  23.200  23.540  23.430
[2273]  23.160  22.070  21.540  21.680  21.770  22.450  23.660  24.630
[2281]  25.550  28.360  30.540  33.390  35.730  36.490  37.480  38.450
[2289]  39.160  39.340  38.860  40.070  39.590  39.650  40.080  40.530
[2297]  40.700  40.770  40.740  40.330  39.690  38.920  37.890  35.750
[2305]  33.920  33.900  32.440  29.400  25.580  26.110  26.880  27.150
[2313]  27.410  27.060  26.930  26.210  26.490  26.550  26.600  26.580
[2321]  26.570  26.400  26.530  26.850  26.820  26.330  27.290  28.610
[2329]  30.400  32.500  34.540  36.620  38.470  39.750  40.570  41.010
[2337]  42.050  41.700  41.520  41.660  41.610  41.780  42.230  42.130
[2345]  42.450  42.060  41.970  41.490  40.660  39.030  37.500  36.340
[2353]  34.770  32.510  32.370  31.760  29.300  27.460  27.730  28.210
[2361]  28.410  27.550  25.870  25.420  24.940  24.920  24.620  24.800
[2369]  24.640  22.740  22.320  22.580  23.710  23.460  24.500  26.020
[2377]  26.840  29.700  32.690  35.540  36.090  36.690  39.060  38.490
[2385]  38.970  39.390  39.970  40.360  40.310  40.480  40.560  40.770
[2393]  40.770  40.720  40.500  40.120  39.200  37.950  36.580  35.750
[2401]  36.110  31.050  29.980  30.040  29.010  29.530  29.260  29.160
[2409]  29.310  28.760  27.840  27.160  26.750  26.570  27.050  26.370
[2417]  26.150  26.400  26.940  27.080  26.780  26.460  27.040  28.460
[2425]  29.400  30.700  32.840  35.230  37.290  37.750  38.760  38.330
[2433]  38.660  39.200  39.160  39.500  39.510  39.220  39.730  39.860
[2441]  39.890  39.970  39.650  39.280  38.230  37.780  35.460  33.170
[2449]  32.820  30.190  24.590  25.020  23.910  24.380  24.390  24.300
[2457]  24.430  24.370  24.310  24.530  24.590  24.470  24.270  24.070
[2465]  23.790  22.650  22.320  22.250  22.010  22.040  23.000  24.360
[2473]  25.640  27.430  29.110  30.920  32.280  33.680  34.390  35.410
[2481]  36.230  35.720  36.950  37.370  37.920  38.250  38.630  38.160
[2489]  37.480  37.180  36.770  36.190  34.880  33.120  31.810  30.400
[2497]  29.530  29.260  28.900  27.600  25.290  25.360  26.360  27.150
[2505]  28.620  29.310  28.630  28.320  28.220  28.690  28.500  28.100
[2513]  27.220  26.580  27.040  26.740  25.860  25.830  26.320  27.590
[2521]  28.780  31.010  32.450  33.840  34.090  33.880  34.910  35.820
[2529]  36.190  35.820  36.250  36.840  37.700  37.650  39.030  38.470
[2537]  38.510  36.760  36.150  36.950  36.680  35.190  33.400  31.520
[2545]  30.180  29.000  28.290  27.580  27.010  26.890  26.650  26.110
[2553]  26.190  26.490  25.760  25.340  25.730  26.310  26.330  26.890
[2561]  26.460  26.310  26.230  25.300  24.670  24.730  25.540  26.720
[2569]  28.210  30.040  31.850  34.300  34.360  36.310  36.980  37.240
[2577]  37.770  37.820  38.700  35.890  34.590  33.040  31.880  31.730
[2585]  33.780  33.600  33.340  29.810  28.250  27.470  26.640  25.990
[2593]  25.090  24.800  24.940  24.700  24.310  23.950  23.460  22.980
[2601]  22.550  22.040  21.500  20.790  20.560  20.540  21.090  20.990
[2609]  20.990  20.770  20.380  20.630  20.570  20.640  21.410  22.400
[2617]  22.960  25.210  27.640  30.060  32.000  33.060  34.070  35.030
[2625]  35.840  36.660  36.060  35.690  34.820  34.130  34.980  35.730
[2633]  35.110  34.170  33.670  33.110  32.540  31.890  31.190  31.010
[2641]  30.770  30.530  30.120  27.500  24.470  24.530  24.640  25.420
[2649]  25.430  25.020  24.970  24.830  24.580  24.530  23.940  23.630
[2657]  23.310  23.260  23.060  23.020  23.090  23.420  23.820  24.810
[2665]  25.880  27.170  27.670  28.780  29.690  29.890  30.510  30.870
[2673]  30.500  30.800  32.600  33.800  33.640  33.590  34.480  34.710
[2681]  35.250  33.220  34.210  33.970  32.640  31.930  30.260  29.240
[2689]  28.280  28.020  27.880  27.980  27.810  27.410  27.110  26.890
[2697]  25.830  24.730  22.990  22.440  22.790  23.600  23.970  23.980
[2705]  23.590  22.600  22.340  22.380  22.180  22.080  22.620  24.490
[2713]  25.900  28.540  30.840  32.900  34.570  35.890  36.340  37.380
[2721]  38.420  37.500  37.110  37.060  37.890  37.710  37.790  38.130
[2729]  38.090  37.510  37.450  37.180  36.060  35.260  33.500  31.050
[2737]  29.680  28.950  28.100  26.830  24.240  24.520  25.040  25.570
[2745]  25.590  25.440  25.100  24.790  24.520  24.620  24.470  24.110
[2753]  23.960  23.870  24.040  23.920  23.570  23.890  25.560  26.570
[2761]  27.800  28.660  28.920  30.630  31.130  31.600  32.560  31.970
[2769]  32.520  32.690  33.560  34.530  35.110  34.920  35.180  35.660
[2777]  36.110  36.650  36.110  35.260  34.380  33.450  32.150  29.930
[2785]  28.740  28.010  28.260  28.170  28.210  29.580  29.560  28.500
[2793]  28.520  27.220  23.990  24.680  25.670  26.270  26.160  26.410
[2801]  25.330  23.290  23.280  23.910  24.360  24.610  24.970  24.870
[2809]  23.650  25.630  29.240  33.050  35.120  34.860  33.830  33.910
[2817]  35.780  35.560  35.320  36.250  35.740  36.130  37.300  37.320
[2825]  37.620  37.590  37.440  37.080  36.500  35.070  32.500  32.060
[2833]  32.100  31.070  32.170  28.360  23.400  26.260  29.630  29.710
[2841]  29.560  28.980  27.770  27.790  27.740  26.720  26.390  25.820
[2849]  25.700  25.070  24.740  24.630  24.870  24.890  24.830  25.610
[2857]  26.890  28.470  30.100  31.760  33.150  33.010  32.410  32.720
[2865]  34.210  34.730  35.670  35.320  34.600  34.440  34.170  34.460
[2873]  34.800  34.110  33.770  33.730  33.710  32.810  31.900  30.320
[2881]  29.410  29.070  28.600  27.880  27.930  29.010  29.060  28.750
[2889]  27.940  26.960  26.710  27.490  28.310  27.910  27.840  27.130
[2897]  26.480  26.120  25.920  25.700  25.870  26.070  27.090  26.710
[2905]  27.370  28.550  29.170  29.970  30.390  30.730  31.830  32.080
[2913]  32.090  32.330  32.210  32.480  32.180  31.520  31.630  32.360
[2921]  31.880  31.440  31.060  30.360  29.490  28.380  27.260  26.410
[2929]  25.870  25.650  25.110  25.030  25.040  24.590  23.800  23.170
[2937]  22.940  22.850  22.550  21.620  21.210  21.100  20.980  20.850
[2945]  21.150  21.300  20.550  20.210  19.970  19.860  20.310  21.700
[2953]  23.280  24.280  26.320  29.480  31.910  33.140  33.940  34.550
[2961]  35.490  35.880  36.410  36.620  36.580  36.630  36.820  36.950
[2969]  37.330  37.230  36.920  36.680  36.060  34.770  32.170  30.190
[2977]  29.190  28.420  27.870  26.550  23.880  23.820  24.400  24.530
[2985]  24.250  24.340  23.960  23.740  23.710  23.890  23.490  23.370
[2993]  23.360  23.170  22.930  22.770  22.690  22.480  22.620  24.540
[3001]  26.960  28.800  30.570  33.550  35.650  37.060  37.760  38.520
[3009]  39.460  39.430  39.900  39.860  39.390  40.070  40.180  40.130
[3017]  39.750  40.070  39.800  39.320  38.730  36.970  35.480  33.910
[3025]  32.910  32.240  32.510  31.060  29.790  29.850  30.350  29.430
[3033]  28.600  26.540  23.410  23.320  24.570  25.040  25.220  27.400
[3041]  25.750  22.800  21.910  22.100  22.520  22.710  23.580  25.200
[3049]  24.460  27.460  30.710  32.480  35.090  35.840  36.200  37.050
[3057]  36.410  36.620  36.490  37.140  37.920  38.270  38.690  38.910
[3065]  39.320  39.230  38.750  38.070  36.970  35.190  34.000  32.800
[3073]  31.680  30.730  29.870  25.600  23.840  23.970  24.040  23.720
[3081]  23.430  23.520  23.630  23.540  23.860  23.460  23.110  22.820
[3089]  22.350  22.680  22.660  22.600  22.280  21.910  21.960  22.810
[3097]  24.100  25.400  27.020  30.140  32.940  34.970  35.820  37.130
[3105]  36.960  36.650  36.490  36.810  36.090  35.840  36.310  36.520
[3113]  36.640  36.380  35.110  33.990  34.460  33.180  31.470  30.340
[3121]  29.940  28.410  27.160  26.010  25.480  24.480  24.290  24.130
[3129]  24.330  24.280  23.280  23.010  23.320  26.070  26.620  26.420
[3137]  25.610  24.770  25.010  25.520  25.250  24.870  24.930  25.620
[3145]  26.110  28.190  29.630  29.770  30.630  31.040  32.400  32.550
[3153]  33.540  34.020  34.670  35.490  34.680  33.930  33.890  34.770
[3161]  35.260  35.750  35.380  34.700  33.710  32.740  30.200  27.400
[3169]  26.260  25.920  25.590  25.130  25.460  27.600  27.440  25.610
[3177]  24.010  22.530  21.530  21.130  21.080  21.030  21.000  20.930
[3185]  20.740  20.660  21.130  21.230  21.360  21.170  21.420  22.710
[3193]  25.190  27.200  28.840  31.200  33.300  34.400  34.190  34.690
[3201]  35.530  35.110  35.140  35.250  35.560  35.810  35.490  35.800
[3209]  35.870  35.590  35.360  34.910  33.920  32.390  30.650  28.810
[3217]  27.360  26.470  25.750  25.930  25.730  24.850  23.430  22.760
[3225]  22.440  22.080  22.270  21.890  21.100  20.760  20.250  19.560
[3233]  19.120  19.030  19.010  18.760  18.890  18.470  18.880  20.810
[3241]  23.580  26.260  28.400  30.880  33.310  34.560  35.180  36.010
[3249]  35.670  36.170  36.170  36.280  35.730  35.660  35.920  36.110
[3257]  36.330  35.930  35.730  35.000  34.240  32.690  30.290  29.020
[3265]  28.190  27.920  27.260  25.880  24.520  23.740  23.220  22.630
[3273]  22.080  21.780  20.230  19.650  19.830  20.130  19.670  19.300
[3281]  18.980  17.990  17.300  17.400  17.320  17.270  17.600  18.910
[3289]  21.210  24.170

Visualize data

ggplot(data=tutorial_dat)+geom_histogram(mapping = aes(x=AirTC_Avg,fill=Rainfall>0)) + theme_bw(base_size = 40)

plot of chunk unnamed-chunk-16

Read data

# print variable AirTC_Avg of data set "tutorial_dat"
which(tutorial_dat$AirTC_Avg<(-10.))
 [1]   1 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561
[18] 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578
[35] 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593
tutorial_dat$AirTC_Avg[546:593]
 [1] -78.05 -78.13 -78.15 -78.15 -78.17 -78.17 -78.19 -78.20 -78.21 -78.20
[11] -78.20 -78.20 -78.22 -78.21 -78.24 -78.23 -78.25 -78.20 -78.22 -78.17
[21] -78.15 -78.13 -78.09 -78.02 -77.98 -77.93 -77.86 -77.90 -77.91 -77.85
[31] -77.68 -77.70 -77.71 -77.72 -77.79 -77.81 -77.82 -77.76 -77.78 -77.77
[41] -77.72 -77.80 -77.85 -77.88 -77.91 -77.96 -78.00 -13.13
tail(tutorial_dat$AirTC_Avg)
[1] 17.32 17.27 17.60 18.91 21.21 24.17

Visualize data for georeferenced plots

field<-read.csv('data2_r_intro.csv')
# print structure of data set "field"
str(field)
'data.frame':   807 obs. of  10 variables:
 $ Longitude  : num  -112 -112 -112 -112 -112 ...
 $ Latitude   : num  33.1 33.1 33.1 33.1 33.1 ...
 $ Fix.Type   : int  2 2 2 2 2 2 2 2 2 2 ...
 $ UTC.Time   : int  182427 182427 182427 182427 182428 182428 182428 182428 182428 182429 ...
 $ Logger.Time: int  136200 136400 136600 136800 137000 137200 137400 137600 137800 138000 ...
 $ Config.    : int  49 49 49 49 49 49 49 49 49 49 ...
 $ Count      : int  681 682 683 684 685 686 687 688 689 690 ...
 $ NDVI       : num  0.652 0.782 0.758 0.579 0.996 0.669 0.669 0.769 0.717 0.723 ...
 $ NIR        : num  -0.0026 -0.0022 -0.0025 -0.002 -0.0025 -0.0024 -0.0014 -0.003 -0.0026 -0.0032 ...
 $ Red        : num  0 0 0 0 0 0 0 0 0 0 ...

Visualize data

ggplot(data=field)+geom_point(mapping = aes(x=Latitude,y=Longitude,color=NDVI), size=6)+scale_color_gradient(low="blue", high="yellow") + theme_bw(base_size = 40)

plot of chunk unnamed-chunk-21

Resources (listed under: environmentaldatainitiative.org)

  • User contributed documentation
  • Reference sheets
  • Mailing lists: R-help
  • Active Stackoverflow member
  • Books

Thank you for your attention!